home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20000217-20000824 / 000459_news@columbia.edu _Wed Aug 16 10:42:52 2000.msg < prev    next >
Internet Message Format  |  2020-01-01  |  6KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from watsun.cc.columbia.edu (watsun.cc.columbia.edu [128.59.39.2])
  3.     by uhaligani.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id KAA28121
  4.     for <kermit.misc@cpunix.cc.columbia.edu>; Wed, 16 Aug 2000 10:42:52 -0400 (EDT)
  5. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  6.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id KAA16890
  7.     for <kermit.misc@watsun.cc.columbia.edu>; Wed, 16 Aug 2000 10:42:51 -0400 (EDT)
  8. Received: (from news@localhost)
  9.     by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id KAA20872
  10.     for kermit.misc@watsun.cc.columbia.edu; Wed, 16 Aug 2000 10:29:49 -0400 (EDT)
  11. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  12. From: fdc@columbia.edu (Frank da Cruz)
  13. Subject: Re: Newbie question
  14. Date: 16 Aug 2000 14:29:48 GMT
  15. Organization: Columbia University
  16. Message-ID: <8ne8gs$kc6$1@newsmaster.cc.columbia.edu>
  17. To: kermit.misc@columbia.edu
  18.  
  19. In article <8nd1lo$7a5$1@samba.rahul.net>,
  20. Clarence Dold  <dold@rahul.net> wrote:
  21. : : Clarence Dold  <dold@rahul.net> wrote:
  22. : : : I use K95 to log in to a "system", using the supplied login.ksc.
  23. :     ...
  24. : : : Can I have a moderately encrypted password file on unix, like the one for
  25. : : : K95, so I don't have to key it in?
  26. : Frank da Cruz <fdc@watsun.cc.columbia.edu> wrote:
  27. : : There's a section in the C-Kermit book on this, starting on page 449 in the
  28. : : second edition.  Of course, this is leaving aside the question of using a
  29. : : secure transport in the first place (like Kerberos, SSL, SRP, etc).
  30. : This "system" is a simple gadget that happens to have a telnet interface,
  31. : so I can't move to a secure transport, but the "pg 449" solution looks like
  32. : the right spot.
  33. : I found two things that were confusing me, making me think I had done
  34. : something wrong.  One is in the autotelnet.ksc provided on the
  35. : ckermit 7.0 CDROM.  
  36. : Feb 26 11:51 AUTOTELN.KSC. line 52
  37. :     if > \fsplit(\%1) 1 {               ; Allow only one "word" here.
  38. The idea here was to prevent the user from specifying a port, since the
  39. autotelnet script wasn't designed to deal with non-Telnet ports (not that
  40. it couldn't have been, but the idea is to demo the most common application).
  41.  
  42. : Since these are simple little devices, I don't have hosts entries for them,
  43. : so I was putting in an IP address.  fsplit returns "4" for the ipaddress
  44. : because of the . separator, and asks for a host name repeatedly.
  45. : This wouldn't be a problem if I was calling the macro and supplying the
  46. : args, but I tried "testing" first. ;-(
  47. You can specify break and include sets for \fsplit().  The autotelnet script
  48. should use:
  49.  
  50.   if > \fsplit(\%1,,,.)
  51.  
  52. (that's three commas and a period.)  Thanks for noticing; I fixed the
  53. local copy.
  54.  
  55. Aside (for those who might not have noticed): C-Kermit 7.0 gives you help for
  56. built-in functions:
  57.  
  58.   C-Kermit>help function split
  59.  
  60.   \fsplit(s1,&a,s2,s3) - Assign string words to an array.
  61.     s1 = String
  62.     &a = array designator
  63.     s2 = optional break set.
  64.     s3 = optional include set.
  65.     Break and include sets are as in \fword().
  66.     All arguments are optional.  If \&a[] not declared, it is created.
  67.   Returns integer:
  68.     Number of words assigned.
  69.  
  70. Use "show functions" to list the available functions and "help function xxx"
  71. to get help about function xxx, where xxx can be \fxxx(), fxxx, or just xxx,
  72. e.g. "help func \fsplit()", "help func fsplit", or "help func split".
  73.  
  74. : The other is a Windows-ism, and has to do with an associated snippet of code
  75. : that I had been using on unix already, and was trying to move to K95.
  76. : To track the separate "systems", I do some file name creation:
  77. :     log session \v(macro)_\v(line)_\v(ndate).log
  78. : which works fine on unix, but on Win2k, the filename truncates to the ":"
  79. : that is part of the \v(line).  I fixed that portion with
  80. :     log session \v(macro)_\ftrim(\v(line),":teln").\v(ndate).log
  81. : While I'm at it, I'd like the equivalent for awk gsub(), where
  82. : I could substitute "_" for the "." in the IP address.
  83. Subsequently you found \freplace() (string replacement), not that you need
  84. it if you specify break/include sets to \fsplit().  Jeff also suggested
  85. \fsubstitute() (character replacement, like Unix tr) but that's not in 7.0;
  86. it will be in 7.1, to be announced for testing "shortly".
  87.  
  88. : Eventually, I'm going to get good at this kermit stuff.
  89. : People are starting to hang around my cubbie, watching scripts flow by, 
  90. : as well as the seamless telnet/ftp/login tasks that they are all
  91. : forced to cobble their way through, with the standard mix of
  92. : Solaris/Linux/Windows tools.
  93. Eventually I hope more people will begin to see the advantage of Kermit
  94. scripting: scripts that are portable to many platforms, work with many
  95. communication methods, and can do lots of stuff.  Spread the word!
  96.  
  97. > This online pdf manual is going to be the death of me.
  98. > how could I not locate \freplace() ?
  99. > It just leaps out at me on the printed page, but I get searching and
  100. > scrolling in the pdf and miss stuff ;-)
  101. >
  102. The PDF version of "Using C-Kermit" that comes with K95 was a business
  103. decision of the publisher.  I prefer real books too, but you don't always
  104. have them with you, plus as you say, the PDF is searchable.  Of course the
  105. book is still available too.
  106.  
  107. The next edition will bring together the various scattered update notes,
  108. etc, and should be more pleasant to use in PDF form since it will have been
  109. designed for that from the beginning, rather than converted ex post facto.
  110.  
  111. So much to do, so little time...
  112.  
  113. - Frank